//logs.js
var app = getApp();

Page({
  data: {
    livDailies:[],
    livLivestock:'',
    liv_id :''
  },
  onLoad: function (options) {
    var that = this
    console.log(options.livDailies)
    console.log(options.livLivestock)
    that.setData({
      livDailies: JSON.parse(options.livDailies),
      livLivestock: JSON.parse(options.livLivestock),
      liv_id: JSON.parse(options.livLivestock).livestockId
    })
  },
 
  insertCheckPlague: function (event) {
      var that = this
      let ext;
    if (event.currentTarget.id=="1"){
       ext = "通过"
    }else{
       ext = "不通过"
    }
    let data = {
      livestockId: that.data.liv_id,
      ext1:ext 
    }
    app.netRequest({
      url: '/liv/daily/insertCheckPlague',
      data: data,
      success: function (res) {
	   wx.showModal({
          title: '提示',
          content: '审核成功!'
         })
      }
    })
    return
  }
})

 
